package com.zhixi100.productservice.service;

import com.zhixi100.productservice.entity.Product;
import com.zhixi100.productservice.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * author:tommy
 * date:2018/12/13
 */
@Service
public class ProductService {

    @Autowired
    private ProductMapper productMapper;

    public Product findById(int productId){
        return productMapper.findById(productId);
    }

    public void reduceStore(int id){
         productMapper.reduceStore(id);
    }
}
